package test;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author study
 * @version 1.0
 * @date 2020/8/14 21:18
 */
public class App {
    public static void main(String[] args) {
        Student tell = new Student("tell");
        tell.sayName();

        com.study.scala.bean.Student lisi = new com.study.scala.bean.Student("lisi");
        System.out.println(lisi);
        com.study.scala.bean.Student copy = lisi.copy("张三");
        System.out.println(copy);
        lisi.sayName();
        String val = "12952051";

        String tel = "18753993252";
        // 括号表示组，被替换的部分$n表示第n组的内容
        tel = tel.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
        System.out.println(tel);

        //这两个几乎相同
        System.out.println(System.currentTimeMillis());
        System.out.println(new Date().getTime());

        System.out.println(LocalDateTime.now().getNano());

    }
}
